#!/bin/bash
cd /root

wget https://pan.uniportal.cc:586/seafhttp/files/b0057f8e-5e20-447f-b1b2-dd9e1a68c910/ffmpeg-7.0.2.tar.xz  --no-check-certificate 
tar -xvf ffmpeg-7.0.2.tar.xz
cd ffmpeg-7.0.2/
./configure --prefix=/usr/local/ffmpeg  --disable-static  --enable-shared --disable-doc
make -j120
make install

cat <<EOF >/usr/local/set_ffmpeg_env.sh
export PATH=/usr/local/ffmpeg/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/ffmpeg/lib/:$LD_LIBRARY_PATH
export PKG_CONGIF_PATH=/usr/local/ffmpeg/lib/pkgconfig/:$PKG_CONGIF_PATH
EOF

source /usr/local/set_ffmpeg_env.sh
